package cn.bitkit.component.config;

import cn.bitkit.component.flow.common.BaseFlowConfig;
import cn.bitkit.component.flow.executor.FlowAsyncExecutor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.context.annotation.Bean;

/**
 * @author changbo
 */
@Slf4j
@AutoConfiguration
@ConditionalOnBean(BaseFlowConfig.class)
public class ExecutorAutoConfig {

    @Bean
    public FlowAsyncExecutor chainExecutor() {
        return new FlowAsyncExecutor();
    }

}
